<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .container{
            width: 800px;
            height: 400px;
            background-color: #005ea7;
            margin: 100px auto;
            position: relative;
        }
        .one{
            width: 100px;
            height: 100px;
            background-color: #f30213;
            position: absolute;
            left: 20px;
            top:30px;
        }
    </style>
    <script src="jquery.js"></script>
    <script>
        $(function (){
           const offset = $(".one").offset()
            console.log(offset.left,offset.top)
            const position = $(".one").position();
            console.log(position.left,position.top)
        })
    </script>
</head>
<body>
    <div class="container">
        <div class="one"></div>
    </div>
</body>
</html>